#ifndef SES_COMMON_H_
#define SES_COMMON_H_

#include <stdbool.h>
#include <stdlib.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>



/**
 * Pin address of port x
 *
 * Example: PING == PIN(PORTG)
 */
#define PIN(x) (*(&(x) - 2))

/**
 * Address of data direction register of port x
 *
 * Example: DDRG == DDR(PORTG)
 */
#define DDR(x) (*(&(x) - 1))



#endif /* SES_COMMON_H_ */
